package com.xiaomage.view.draw7

import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.widget.LinearLayout
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        val paintView=PaintView(this)
        val params=LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MATCH_PARENT,
                3500
        )
        paintView.layoutParams=params
        ll_zong.addView(paintView)
        bt_start.setOnClickListener{
            paintView.startAnimator()
        }
        val discretePathEffectPathView= DiscretePathEffectPathView(this)
        val params2=LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MATCH_PARENT,
                800
        )
        discretePathEffectPathView.layoutParams=params2
        ll_zong.addView(discretePathEffectPathView)

    }
}
